
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>:: Shanti Chakra Foundation ::</title>
<link href="style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="./css/yellow.css" />
<link rel="stylesheet" href="./css/small.css" />

<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</head>
<script type="text/javascript" src="./js/zapatec.js"></script>
<script type="text/javascript" src="./js/calendar.js"></script>
<!-- Loading language definition file -->
 <script type="text/javascript" src="./js/calendar-en.js"></script>
<%@ page import="java.io.* ,java.util.*, java.sql.*, Login.*"%>
<body bgcolor="#0D62A2">
<p>
<% HttpSession hs = request.getSession(true);
   String memid = (String) hs.getAttribute("memid");
if( memid != null )
{ %>
<a href = "javascript:history.go(-1)"> Back</a>
<%}%>
<% 
MySqlConnector ms = new MySqlConnector();
PreparedStatement stmt1;
PreparedStatement stmt2;
ResultSet rs1 ;
ResultSet rs2 ;
ms.Connect();
//Todays birth days   
stmt1 = ms.Connect().prepareStatement("SELECT name, mobile, email, dob  FROM registration where month(curdate())=month(dob)"+
" and day(curdate())=day(dob);");
//Aniversaries
stmt2 = ms.Connect().prepareStatement("SELECT name, mobile, email, mar_aniv FROM registration "+
" where month(curdate())=month(mar_aniv) and day(curdate())=day(mar_aniv);");
rs1 = stmt1.executeQuery();
rs2 = stmt2.executeQuery();
%>
</p>
<form name="form1" method="post" action="GetDates">
<table width="35%" border="0" align="center" cellpadding="0" cellspacing="0" class="greenlink_no_left_padding" >
  <tr>
    <td><span class="greentext"><strong>Select Number of days :</strong></span></td>
    <td>
      <input name="datefrom" type="text" id="datefrom" size="5">
	</td>
  </tr>
  <tr>
    <td class="bluetext"><div align="center">
        <input name="bday" type="submit" class="bluetext" id = "bday" value="Birthdays">
    </div></td>
    <td class="bluetext"><div align="center">
      <input name="aniv" type="submit" class="bluetext" value="Anniversaries" io = "aniv">
    </div></td>
  </tr>
<%System.out.print("result set for birthdays "+stmt1);
    %>
</table>
<br>
<table width="537" border="1" align="center" class="greenlink_no_left_padding" >
 <tr>
    <td colspan="4" bgcolor="#333333" class="style4"> 
	  <h3 class="style6 style1">Today's Birth Dates</h3></td>
  <tr>
    <td class="redtext">Name</td>
    <td class="redtext">Mobile</td>
    <td class="redtext">Mail ID </td>
    <td class="redtext">Date of Birth </td>
  </tr>
  <% while(rs1.next()==true)
 {  %>
  <tr>
  	<td width="64" class="boldtext"><span class="style5"><%=rs1.getString(1)%></span></td>
    <td width="112" class="boldtext"><span class="style5"><%=rs1.getString(2)%></span></td>
    <td width="109" class="boldtext"><span class="style5"><%=rs1.getString(3)%></span></td>
	<td width="137" class="boldtext"><span class="style5"><%=rs1.getString(4)%></span></td>
  </tr> <%} %>
</table>

<p><hr class="greenlink">
</p>
<% 
System.out.print("result set for annivarsaries "+stmt2);
  %>
<table width="537" border="1" align="center" class="greenlink_no_left_padding" >
  <tr>
    <td colspan="4" bgcolor="#333333" class="greentext"><h3 class="style6 style1">Anniversarie's Birth Dates</h3></td>
  </tr>
  <tr>
    <td class="redtext">Name</td>
    <td class="redtext">Mobile</td>
    <td class="redtext">Mail ID </td>
    <td class="redtext">Mariage Aniversary</td>
  </tr>
    <% while(rs2.next()==true)
	{  %>
  <tr class="boldtext">
  	<td width="77" class="boldtext"> <span class="style5"><%=rs2.getString(1)%></span></td>
    <td width="144" class="boldtext"><span class="style5"><%=rs2.getString(2)%></span></td>
    <td width="144" class="boldtext"><span class="style5"><%=rs2.getString(3)%></span></td>
    <td width="144" class="boldtext"><span class="style5"><%=rs2.getString(4)%></span></td>
 </tr><%} %>
</table>

<p>&nbsp;</p>
</form>
</body>
</html>